package com.yunsc.store.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.yunsc.system.utils.SMSUtils;
import lombok.Data;

/**
 * @version: 1.0
 * @Author: adan
 * @description:
 * @date: 2024-06-15 9:28
 */
@Data
public class SMSNoticeVO {
    @JsonProperty("default")
    private String defaultEngine;
    private SMSEngine engine;
    private SMSScene scene;

    @Data
    public static class SMSEngine {
        // 阿里云短信
        private SMSAliyun aliyun;
        // 腾讯云短信
        private SMSQcloud qcloud;
        // 七牛云短信
        private SMSQiniu qiniu;
    }

    @Data
    public static class SMSAliyun {
        @JsonProperty("AccessKeyId")
        private String accessKeyId;
        @JsonProperty("AccessKeySecret")
        private String accessKeySecret;
        private String sign;
        private String name = "阿里云短信";
        private String website = "https://dysms.console.aliyun.com/dysms.htm";

    }

    @Data
    public static class SMSQcloud {
        @JsonProperty("SdkAppID")
        private String sdkAppID;
        @JsonProperty("AccessKeyId")
        private String accessKeyId;
        @JsonProperty("AccessKeySecret")
        private String accessKeySecret;
        private String sign;
        private String name = "腾讯云短信";
        private String website = "https://console.cloud.tencent.com/smsv2";
    }

    @Data
    public static class SMSQiniu {
        @JsonProperty("AccessKey")
        private String accessKey;
        @JsonProperty("SecretKey")
        private String secretKey;
        private String name = "七牛云短信";
        private String website = "https://portal.qiniu.com/sms/dashboard";
    }

    @Data
    public static class SMSScene {
        private SMSCaptcha captcha;
        @JsonProperty("order_pay")
        private SMSOrderPay orderPay;
    }

    @Data
    public static class SMSCaptcha {
        @JsonProperty("isEnable")
        private boolean isEnable;
        @JsonProperty("templateCode")
        private String templateCode;
        private String name = "短信验证码 (通知用户)";
        private String content = "验证码%s，您正在进行身份验证，若非本人操作，请勿泄露。";
        private Object variables;
    }

    @Data
    public static class SMSOrderPay {
        @JsonProperty("isEnable")
        private boolean isEnable;
        @JsonProperty("templateCode")
        private String templateCode;
        @JsonProperty("acceptPhone")
        private String acceptPhone;
        private String name = "新付款订单 (通知商家)";
        private String content = "您有一条新订单，订单号为：%s，请注意查看";
        private Object variables;

    }


}
